package com.fzg.controller;


import com.fzg.common.enums.ResponseWrapper;
import com.fzg.common.model.user.param.GetCurrentUserJobInfoParam;
import com.fzg.service.UserJobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户求职表 前端控制器
 * </p>
 *
 * @author fzg
 * @since 2021-12-13
 */
@RestController
@RequestMapping("/user-job")
public class UserJobController {

    @Autowired
    private UserJobService userJobService;

    /**
     * 获取所有求职信息
     * @return ResponseWrapper
     */
    @GetMapping("/getAllJobInfo")
    public ResponseWrapper getAllJobInfo(){
        return userJobService.getAllJobInfo();
    }

    /**
     * 得到当前用户发布的求职信息
     * @return ResponseWrapper
     */
    @GetMapping("/getCurrentUserJobInfo")
    public ResponseWrapper getCurrentUserJobInfo(@Validated GetCurrentUserJobInfoParam param){
        return userJobService.getCurrentUserJobInfo(param);
    }

}
